package com.sh.weblogspringboot.admin.controller;

import com.sh.weblogspringboot.admin.service.AdminFileService;
import com.sh.weblogspringboot.common.aspect.ApiOperationLog;
import com.sh.weblogspringboot.common.util.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author songHai
 * @Classname AdminFileController
 * @Description
 * @Date 2025/4/1 23:03
 */
@RestController
@RequestMapping("/admin/file")
@Api(tags = "Admin 文件模块")
public class AdminFileController {

    @Autowired
    private AdminFileService adminFileService;

    @RequestMapping("/upload")
    @ApiOperationLog(description = "文件上传")
    @ApiOperation(value = "文件上传")
    public Response uploadFile(@RequestParam MultipartFile file) {
        return adminFileService.uploadFile(file);
    }
}
